package com.nuumoblie.bluetoothtools.ble.db.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import com.nuumoblie.bluetoothtools.ble.db.entity.BleDescriptorEntity;

import java.util.List;

@Dao
public interface BleDescriptorDao {

    @Insert
    void insert(BleDescriptorEntity entity);

    @Delete
    void delete(BleDescriptorEntity entity);

    @Query("select * from ble_descriptor where characteristic_id = :id order by _id asc")
    List<BleDescriptorEntity> getDescriptors(int id);

}
